#include <stdio.h>  
  
int mm[14] = {0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};  
int ansM[15];  
  
int main() {  
    int y, m = 1, d = 13, cnt = 0;  
    if (scanf("%d", &y));  
    for (; m <= 12; m++) {  
        int x = (y - 1900) % 4 == 0 ? m <= 2 ? -1 : 0 : 0;  
        x += (y - 1900) / 4 - (y - 1900) / 100 + (y - 1900) / 400;  
        if (((y - 1900) * 365 + mm[m] + d + 1 + x) % 7 == 5)  
            ansM[++cnt] = m;  
    }  
    if (cnt != 1)  
        printf("There are %d Black Fridays in year %d.\nThey are:\n", cnt, y);  
    else  
        printf("There is %d Black Friday in year %d.\nIt is:\n", cnt, y);  
    for (int i = 1; i <= cnt; i++)  
        printf("%d/%d/13\n", y, ansM[i]);  
    return 0;  
}  